<template>
  <div class="btn-div" @click="changeSceneDemo">{{ content }}</div>
  <div class="btn-div" @click="getDataDemo">{{ content2 }}</div>
</template>

<script lang="ts">
import {getUserList,getUserInfo} from "@/http/user";
import {diva, data} from "@/global";


export default {
  name: "index",
  data() {
    return {
      content: '随机切换场景',
      content2: '获取接口数据'
    }
  },
  methods: {
    getDataDemo() {
      // getUserList().then(res => {
      //   console.log(res, 132)
      // })
      getUserInfo().then(res=>{
        console.log(res,333)
      })
    },
    changeSceneDemo() {
      let randNumber = Math.floor(Math.random() * 10);
      let sceneName;
      if(randNumber>5){
        sceneName='半鸟瞰'
      }else{
        sceneName='效果图04'
      }
      diva.client?.applyScene(sceneName)
    },
  }
}
</script>

<style scoped>
.btn-div {
  width: 130px;
  height: 58px;
  margin-left: 60px;
  margin-top: 2px;
  line-height: 62px;
  text-align: center;
  background: #00a5ff6e;
  backdrop-filter: blur(8px);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  pointer-events: all;
}
</style>